<?php
/*------------------------------------------------------------------------

# TZ Portfolio Extension

# ------------------------------------------------------------------------

# author  TranLamTemPlaza

# copyright Copyright (C) 2012 templaza.com. All Rights Reserved.

# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL

# Websites: http://www.templaza.com

# Technical Support:  Forum - http://templaza.com/Forum

-------------------------------------------------------------------------*/

defined('_JEXEC') or die;

require_once JPATH_SITE.'/components/com_tz_portfolio/helpers/route.php';

class modtzlatestnews{
    static function getarticles(){
        $db = JFactory::getDbo();
        $query = $db->getQuery(true);

        $query->select('content.*,xref_content.*');
        $query->from('#__content as content,#__tz_portfolio_xref_content as xref_content');
        $query->where('content.id = xref_content.contentid');

        $db ->setQuery($query);
        $articles = $db ->loadObjectList();
        return $articles;
    }
}